package com.xiaoshuidi.cloud.module.report.dal.mapper.bigdata;

import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.report.controller.bigdata.vo.*;
import com.xiaoshuidi.cloud.module.report.dal.DO.ApartmentDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;


/**
 * 交易数据概览 Mapper
 *
 * @author sxx
 */
@Mapper
//@InterceptorIgnore(tenantLine = "true")
public interface OverviewTransactionMapper extends BaseMapperX<ApartmentDO> {

    /**
     * 获取付款流出数据
     *
     * @return {@link PaymentOutflowVO}
     */
    List<PaymentOutflowVO> getPaymentOutflowData(@Param("startTime")Date startTime,@Param("endTime")Date endTime
            ,@Param("aptId")Long aptId);

    /**
     * 年月营收数据分析
     *
     * @return {@link YearMonthRevenueVO}
     */
    List<YearMonthRevenueVO> getYearMonthRevenueStatistics(@Param("startTime")String startTime,@Param("endTime")String endTime);

    /**
     * 获取收款流入数据
     *
     * @return {@link ReceiptInflowVO}
     */
    ReceiptInflowVO getReceiptInflowData(@Param("startTime")Date startTime, @Param("endTime")Date endTime
            , @Param("aptId")Long aptId);


    /**
     * 获取营收或交易总金额 以及交易笔数
     *
     * @return {@link TotalTransactionDetailsVO}
     */
    TotalTransactionDetailsVO getTotalTransactionDetails(@Param("startTime")Date startTime, @Param("endTime")Date endTime
            , @Param("aptId")Long aptId,@Param("type")String type);


    /**
     * 交易详情
     *
     * @return {@link TransactionDetailsVO}
     */
    TransactionDetailsVO getTransactionDetails(@Param("startTime")Date startTime, @Param("endTime")Date endTime
            , @Param("aptId")Long aptId);


}
